import { useEffect } from "react"
import { qiankunWindow } from "vite-plugin-qiankun/dist/helper"
import { start } from 'qiankun'

const MicroApp = () => {
    useEffect(() => {
        if(!qiankunWindow.__POWERED_BY_QIANKUN__) {
            qiankunWindow.__POWERED_BY_QIANKUN__ = true
            start()
        }
    })
    return (
        <>
            <div className="error-page">
                <h1>react micro 子应用 </h1>
                <h1>index</h1>
            </div>
        </>
    )
}

export default MicroApp